// utils/geoValidator.js
const Joi = require('joi');

module.exports.validateCoordinates = (lat, lon) => {
  const schema = Joi.object({
    lat: Joi.number().min(-90).max(90).required(),
    lon: Joi.number().min(-180).max(180).required()
  });
  
  const { error } = schema.validate({ lat, lon });
  return !error;
};